<?xml version="1.0" encoding="utf-8"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

  <xsl:template match="NewDataSet">
    <!--<ul style="height:expression(document.body.clientHeight-140-4);">-->
	<ul id="nav_list">
      <!--<li class="menu2">
        <div class="Replica-Menu-Div" onmouseover="this.style.cursor='pointer'" onclick="Handbags('sub1')">
          模板例子
        </div>
        <span class="Replica-SubMenu" id="sub1">
          <ol class="menupro">
            <li>
              <a title="用户级别" href="demo/add1.aspx" name="添加例子"  onclick="changelinknav('模板例子','添加例子',this.href);"  target="myMain">添加例子</a>
            </li>


            <li>
              <a title="关系管理" href="demo/list2.aspx" name="列表例子"  onclick="changelinknav('模板例子','列表例子',this.href);"  target="myMain">列表例子</a>
            </li>
            <li>
              <a title="关系管理" href="demo/OpenDivWindow.aspx?mid=08101705265056" name="弹出层例子"
                          onclick="changelinknav('模板例子','弹出层例子',this.href);" target="myMain">弹出层例子</a>
            </li>
          </ol>
        </span>
      </li>-->
      <xsl:for-each select="sysModule">
        <xsl:variable name="I" select="position()"/>
        <xsl:variable name="mid" select="current()/ModuleId"/>
		  
        <xsl:if test="ParentId = '' or ParentId=null">
          <xsl:variable name="purl">
            <xsl:value-of select="UrlAddress" />
            <xsl:text>?mid=</xsl:text>
            <xsl:value-of select="ModuleId" />
          </xsl:variable>
          <xsl:variable name="pname" select="ModuleName"/>
			<xsl:variable name="ImgUrl">
				<xsl:text>images/</xsl:text>
				<xsl:value-of select="ImgName"/>
			</xsl:variable>

          <li class="menu1" style="background-image:url({$ImgUrl})">
            <div class="Replica-Menu-Div" onmouseover="this.style.cursor='pointer'" onclick="Handbags('{$I}')">
              <xsl:value-of select="ModuleName" />
            </div>
            <span class="Replica-SubMenu" id="{$I}">
              <ol class="menupro">
                <xsl:for-each select="//sysModule">
                  <xsl:if test="ParentId = $mid">
                    <xsl:variable name="url">
                      <xsl:value-of select="UrlAddress" />
                      <xsl:text>?mid=</xsl:text>
                      <xsl:value-of select="ModuleId" />
                    </xsl:variable>
                    <xsl:variable name="mname" select="ModuleName"/>
                <li>
                  <a title="{$mname}" href="{$url}" name="{$mname}" onclick="changelinknav('{$pname}','{$mname}',this.href);"  target="myMain">
                    <xsl:value-of select="ModuleName" />
                  </a>
                </li>
                  </xsl:if>
                </xsl:for-each>
              </ol>
            </span>
          </li>
        </xsl:if>
      </xsl:for-each>
    </ul>
  </xsl:template>

</xsl:stylesheet>

